export default [
  // user
  {
    path: '/user',
    component: '../layouts/UserLayout',
    routes: [
      { path: '/user', redirect: '/user/login' },
      { path: '/user/login', name: '登录', component: './User/Login' },
      { component: '404' },
    ],
  },
  // app
  {
    path: '/',
    component: '../layouts/BasicLayout',
    Routes: ['src/pages/Authorized'],
    routes: [
      { path: '/', redirect: '/chartDemo/lineDemo', authority: ['admin', 'user'] },
      {
        path: '/chartDemo',
        name: '图表',
        icon: 'dot-chart',
        routes: [
          {
            path: '/chartDemo/lineDemo',
            name: '折线图',
            icon: 'line-chart',
            component: './ChartDemo/LineDemo',
          },
          {
            path: '/chartDemo/barDemo',
            name: '柱状图',
            icon: 'bar-chart',
            component: './ChartDemo/BarDemo',
          },
          {
            path: '/chartDemo/pieDemo',
            name: '饼图&水波&仪表盘',
            icon: 'pie-chart',
            component: './ChartDemo/PieDemo',
          },
          {
            path: '/chartDemo/areaDemo',
            name: '面积图',
            icon: 'area-chart',
            component: './ChartDemo/AreaDemo',
          },
          {
            path: '/chartDemo/mixChartDemo',
            name: '混合图表',
            icon: 'fund',
            component: './ChartDemo/MixChartDemo',
          },
          {
            path: '/chartDemo/mapDemo',
            name: '地图',
            icon: 'global',
            component: './ChartDemo/MapDemo',
          },
        ],
      },
      {
        path: '/demo',
        icon: 'form',
        name: '其他',
        routes: [
          {
            path: '/demo/antDesignDemo',
            name: 'antDesign',
            component: './Demo/AntDesignDemo',
          },
          {
            path: '/demo/antDesignProDemo',
            name: 'antDesignPro',
            component: './Demo/AntDesignProDemo',
          },
          {
            path: '/demo/braftEditorDemo',
            name: '富文本BraftEditor',
            component: './Demo/BraftEditorDemo',
          },
          {
            path: '/demo/pdfViewDemo',
            name: 'pdf预览pdfjsDist',
            component: './Demo/PdfViewDemo',
          },
          {
            path: '/demo/gridLayoutDemo',
            name: '自定义布局GridLayout',
            component: './Demo/GridLayoutDemo',
          },
          {
            path: '/demo/threeDemo',
            name: '3D魔球',
            component: './Demo/ThreeDemo',
          },
          {
            path: '/demo/g6Demo',
            name: '关系图',
            component: './Demo/G6GraphDemo',
          },
          {
            path: '/demo/bubble',
            name: '气泡',
            component: './Demo/Bubble',
          },
        ],
      },
      {
        name: 'exception',
        hideInMenu: true,
        path: '/exception',
        routes: [
          // exception
          {
            path: '/exception/403',
            name: 'not-permission',
            component: './Exception/403',
          },
          {
            path: '/exception/404',
            name: 'not-find',
            component: './Exception/404',
          },
          {
            path: '/exception/500',
            name: 'server-error',
            component: './Exception/500',
          },
        ],
      },
      {
        component: '404',
      },
    ],
  },
];
